package com.yudean.esb.mapper.sys;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yudean.esb.domain.sys.AppUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface AppUserMapper extends BaseMapper<AppUser> {

    @Select("select max(login_id) from esb.sys_appuser")
    int selectMaxId();

    @Update("update esb.sys_appuser_org o set o.comp_code = #{compCode} where o.login_id = #{loginId}")
    int updateCompCode(@Param("loginId") Integer loginId, @Param("compCode")String compCode);

    int updateUser(AppUser user);

    int createUser(AppUser appUser);

    int insertCompCode(AppUser appUser);

}
